<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>jacktransport</title>
    <link rel="stylesheet" type="text/css" href="csound.css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.78.1" />
    <link rel="home" href="index.html" title="The Canonical Csound Reference Manual" />
    <link rel="up" href="OpcodesTop.html" title="Orchestra Opcodes and Operators" />
    <link rel="prev" href="JackoTransport.html" title="JackoTransport" />
    <link rel="next" href="jitter.html" title="jitter" />
  </head>
  <body>
    <div class="navheader">
      <table width="100%" summary="Navigation header">
        <tr>
          <th colspan="3" align="center">jacktransport</th>
        </tr>
        <tr>
          <td width="20%" align="left"><a accesskey="p" href="JackoTransport.html">Prev</a> </td>
          <th width="60%" align="center">Orchestra Opcodes and Operators</th>
          <td width="20%" align="right"> <a accesskey="n" href="jitter.html">Next</a></td>
        </tr>
      </table>
      <hr />
    </div>
    <div class="refentry">
      <a id="jacktransport"></a>
      <div class="titlepage"></div>
      <a id="IndexJacktransport" class="indexterm"></a>
      <div class="refnamediv">
        <h2>
          <span class="refentrytitle">jacktransport</span>
        </h2>
        <p>jacktransport — 
      Start/stop jack_transport and can optionally relocate the playback head.
    </p>
      </div>
      <div class="refsect1">
        <a id="idp117973888"></a>
        <h2>Description</h2>
        <p>
      Start/stop jack_transport and can optionally relocate the playback head.
    </p>
      </div>
      <div class="refsect1">
        <a id="idp117975296"></a>
        <h2>Syntax</h2>
        <pre class="synopsis"><span class="command"><strong>jacktransport</strong></span> icommand [, ilocation]</pre>
      </div>
      <div class="refsect1">
        <a id="idp118037216"></a>
        <h2>Initialization</h2>
        <p>
      <span class="emphasis"><em>icommand</em></span> -- 1 to start playing, 0 to stop.
    </p>
        <p>
      <span class="emphasis"><em>ilocation</em></span> -- optional location in seconds to specify where the playback head should be moved. If omitted, the transport is started from current location.
    </p>
        <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
          <table border="0" summary="Note">
            <tr>
              <td rowspan="2" align="center" valign="top" width="25">
                <img alt="[Note]" src="images/note.png" />
              </td>
              <th align="left">Note</th>
            </tr>
            <tr>
              <td align="left" valign="top">Since <span class="emphasis"><em>jacktransport</em></span> depends on jack audio connection kit, it will work only on Linux or Mac OS X systems which have the jack server running.</td>
            </tr>
          </table>
        </div>
      </div>
      <div class="refsect1">
        <a id="idp118040976"></a>
        <h2>Examples</h2>
        <p>
      Here is a simple example of the jacktransport opcode. It uses the file <a class="ulink" href="examples/jacktransport.csd" target="_top"><em class="citetitle">jacktransport.csd</em></a>.
      </p>
        <div class="example">
          <a id="idp118042768"></a>
          <p class="title">
            <strong>Example 411. Simple example of the jacktransport opcode.</strong>
          </p>
          <div class="example-contents">
            <pre class="programlisting">
<span class="csdtag">&lt;CsoundSynthesizer&gt;</span>
<span class="csdtag">&lt;CsOptions&gt;</span>
 
-+rtaudio=JACK -b 64 --sched  -o dac:system:playback_ 
<span class="csdtag">&lt;/CsOptions&gt;</span>
<span class="csdtag">&lt;CsInstruments&gt;</span>
 
<span class="ohdr">sr</span>      <span class="op">=</span>      	44100
<span class="ohdr">ksmps</span>  	<span class="op">=</span>     	16
<span class="ohdr">nchnls</span>	<span class="op">=</span>	2


	<span class="oblock">instr</span> 1
jacktransport p4, p5 
	<span class="oblock">endin</span>

	<span class="oblock">instr</span> 2
jacktransport p4 
	<span class="oblock">endin</span>


<span class="csdtag">&lt;/CsInstruments&gt;</span>
<span class="csdtag">&lt;CsScore&gt;</span>

<span class="stamnt">i</span>2 0 5 1<span class="comment">; play</span>
<span class="stamnt">i</span>2 5 1 0<span class="comment">; stop</span>
<span class="stamnt">i</span>1 6 5 1 2 <span class="comment">; move at 2 seconds and start playing back</span>
<span class="stamnt">i</span>1 11 1 0 0 <span class="comment">; stop and rewind</span>

<span class="stamnt">e</span>

<span class="csdtag">&lt;/CsScore&gt;</span>
<span class="csdtag">&lt;/CsoundSynthesizer&gt;</span>
</pre>
          </div>
        </div>
        <p><br class="example-break" />
    </p>
      </div>
      <div class="refsect1">
        <a id="idp118044704"></a>
        <h2>Credits</h2>
        <table border="0" summary="Simple list" class="simplelist">
          <tr>
            <td>Author: Cesare Marilungo</td>
          </tr>
        </table>
        <p>New in version 5.08</p>
      </div>
    </div>
    <div class="navfooter">
      <hr />
      <table width="100%" summary="Navigation footer">
        <tr>
          <td width="40%" align="left"><a accesskey="p" href="JackoTransport.html">Prev</a> </td>
          <td width="20%" align="center">
            <a accesskey="u" href="OpcodesTop.html">Up</a>
          </td>
          <td width="40%" align="right"> <a accesskey="n" href="jitter.html">Next</a></td>
        </tr>
        <tr>
          <td width="40%" align="left" valign="top">JackoTransport </td>
          <td width="20%" align="center">
            <a accesskey="h" href="index.html">Home</a>
          </td>
          <td width="40%" align="right" valign="top"> jitter</td>
        </tr>
      </table>
    </div>
  </body>
</html>
